package exam.test3;


public class FootballTeam {
    private String teamName;
    private int winNumber;
    private int lossNumber;

    public FootballTeam(String teamName, int winNumber, int lossNumber) {
        this.teamName = teamName;
        this.winNumber = winNumber;
        this.lossNumber = lossNumber;
    }

    public FootballTeam(String teamName) { this.teamName = teamName; this.winNumber=0; this.lossNumber=0; }

    public String getTeamName() {
        return teamName;
    }

    public int getWinNumber() {
        return winNumber;
    }

    public int getLossNumber() {
        return lossNumber;
    }

    private void incrWinNumber() {
        winNumber++;
    }

    private void incrLossNumber() {
        lossNumber++;
    }

    public boolean isGoodRecord() {
        return winNumber > lossNumber;
    }

    public static void main(String[] args) {
        FootballTeam footballTeam = new FootballTeam("AITI", 3, 5);
        System.out.println("good record: " + footballTeam.isGoodRecord());

        footballTeam.incrWinNumber();
        footballTeam.incrWinNumber();
        footballTeam.incrWinNumber();
        System.out.println("good record: " + footballTeam.isGoodRecord());
    }
}
